#ifndef OPTIMIZER_H
#define OPTIMIZER_H

#include "imu_factor.h"
#include "wheel_factor.h"

#include "state.h"
#include "pose_2d.h"

using namespace std;

class Optimizer {
public:
	Optimizer(std::shared_ptr<ImuPreIntegration> imu_preintegration, std::shared_ptr<WheelPreIntegration> wheel_preintegration);
	void OptimizeCeres(State& last_state, State& state, const Eigen::Vector3d &last_velocity, const Eigen::Vector3d &velocity, const Eigen::Vector3d &last_pose, const Eigen::Vector3d &curr_pose);
private:
	std::shared_ptr<ImuFactor> imu_factor_;
	std::shared_ptr<WheelFactor> wheel_factor_;
};

#endif
